{{! -------------------------------------------------------------------------- }}
{{! Copyright 2002-2016, OpenNebula Project, OpenNebula Systems                }}
{{!                                                                            }}
{{! Licensed under the Apache License, Version 2.0 (the "License"); you may    }}
{{! not use this file except in compliance with the License. You may obtain    }}
{{! a copy of the License at                                                   }}
{{!                                                                            }}
{{! http://www.apache.org/licenses/LICENSE-2.0                                 }}
{{!                                                                            }}
{{! Unless required by applicable law or agreed to in writing, software        }}
{{! distributed under the License is distributed on an "AS IS" BASIS,          }}
{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   }}
{{! See the License for the specific language governing permissions and        }}
{{! limitations under the License.                                             }}
{{! -------------------------------------------------------------------------- }}

<div class="row">
  <div class="large-9 columns">
    <table class="info_table dataTable">
      <thead>
        <tr>
          <th>{{tr "CPU"}}</th>
          <th>{{tr "VCPU"}}</th>
          <th>{{tr "Memory"}}</th>
          {{#isFeatureEnabled "showback"}}
          <th>{{tr "Cost / CPU"}}</th>
          <th>{{tr "Cost / MByte"}}</th>
          {{/isFeatureEnabled}}
          <th></th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td id="cpu_info">{{valOrDefault element.TEMPLATE.CPU '-'}}</td>
          <td id="vcpu_info">{{valOrDefault element.TEMPLATE.VCPU '-'}}</td>
          <td id="memory_info">{{humanizeSize "MB" element.TEMPLATE.MEMORY}}</td>
          {{#isFeatureEnabled "showback"}}
          <td id="cpu_cost_info">{{cpuCost}}</td>
          <td id="memory_cost_info" >{{memoryCost}}</td>
          {{/isFeatureEnabled}}
          <td>
          {{#isTabActionEnabled "vms-tab" "VM.resize"}}
          {{#if resizeStateEnabled}}
            <button id="resize_capacity" class="button small success right radius" >{{tr "Resize"}}</button>
          {{else}}
            <button id="resize_capacity" class="button small success right radius" disabled="disabled">{{tr "Resize"}}</button>
          {{/if}}
          {{/isTabActionEnabled}}
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</div>
<div class="row">
  <div class="medium-6 columns">
    <div class="row">
      <div class="large-12 columns">
        <span>{{tr "Real CPU"}}</span>
      </div>
    </div>
    <div class="row">
      <div class="large-12 columns">
        <div class="large-12 columns centered graph vm_cpu_graph" style="height: 100px;">
          <span  id="provision_dashboard_total" style="font-size:80px">
            <i class="fa fa-spinner fa-spin"></i>
          </span>
        </div>
      </div>
    </div>
    <div class="row graph_legend">
      <div class="large-10 columns centered vm_cpu_legend"></div>
    </div>
  </div>
  <div class="medium-6 columns">
    <div class="row">
      <div class="large-12 columns">
        <span>{{tr "Real memory"}}</span>
      </div>
    </div>
    <div class="row">
      <div class="large-12 columns centered graph vm_memory_graph" style="height: 100px;">
        <span  id="provision_dashboard_total" style="font-size:80px">
          <i class="fa fa-spinner fa-spin"></i>
        </span>
      </div>
    </div>
    <div class="row graph_legend">
      <div class="large-10 columns centered vm_memory_legend"></div>
    </div>
  </div>
</div>
